package com.yuandian.api.management.feign;

import com.yuandian.api.management.entity.ConfDocumentExportInfo;
import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteAsynchronousDownloadService", value = "bpm-management")
public interface RemoteAsynchronousDownloadService {

	/**
	 * 查询文档导出数据
	 * @param confDocumentExportInfo
	 * @return
	 */
	@PostMapping("/documentExportInfo/list")
	R<List<ConfDocumentExportInfo>> list(ConfDocumentExportInfo confDocumentExportInfo, @RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 4、上报文件下载状态
	 * @param confDocumentExportInfo
	 * @return
	 */
	@PostMapping("/documentExportInfo/uploadDocumentExportInfo")
	R uploadDocumentExportInfo(ConfDocumentExportInfo confDocumentExportInfo, @RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 4、下载文件，(支持下载文件后，删除文件)
	 * @param fileName
	 * @return
	 */
	@PostMapping("/documentExportInfo/deleteDocumentHandleInfoByFileName/{fileName}")
	R deleteDocumentHandleInfoByFileName(@PathVariable("fileName") String fileName, @RequestHeader(SecurityConstants.FROM) String from);
}
